function animate(obj, target, time, callback) {
    clearInterval(obj.timer);
    obj.timer = setInterval(function () {
        obj.step = (target - obj.offsetLeft) / 10;
        obj.step = obj.step > 0 ? Math.ceil(obj.step) : Math.floor(obj.step);
        if (obj.offsetLeft == target) {
            clearInterval(obj.timer);
            // if (callback) {
            //     callback()l
            // }
            callback && callback();
        } else {
            obj.style.left = obj.offsetLeft + obj.step + 'px';
        }
    }, time);
}
